package com.yilemall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yilemall.common.utils.PageUtils;
import com.yilemall.product.entity.BrandEntity;
import com.yilemall.product.entity.CategoryBrandRelationEntity;

import java.util.List;
import java.util.Map;

/**
 * 品牌分类关联
 *
 * @author wangxiaoqi
 * @email wxq_strive@163.com
 * @date 2020-10-09 15:16:45
 */
public interface CategoryBrandRelationService extends IService<CategoryBrandRelationEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 保存商品和品牌的详细信息
     * @param categoryBrandRelation
     */
    void saveDetail(CategoryBrandRelationEntity categoryBrandRelation);

    /**
     * 根据品牌id修改品牌名称
     * @param brandId
     * @param name
     */
    void updateRelation(Long brandId, String name);

    /**
     * 通过分类id查询品牌
     * @param catId
     * @return
     */
    List<BrandEntity> getBrandsByCatId(Long catId);
}

